#include <stdio.h>
int main()
{
	int a = 0;
	int b = 0;
	int shang = 0;
	int yushu = 0;
	scanf_s("%d %d", &a, &b);
	shang = a / b;
	yushu = a % b;
	printf("%d %d", shang, yushu);
	return 0;
}